var hostname = '127.0.0.1';
var port = 9000;
var http = require("http");
var book = require("./book.js");
http.createServer(function(req, res){
    res.writeHead(200, {
        "Content-Type": "text/plain; charset=utf-8"
    });
    res.end(book.read());
}).listen(port, hostname);

console.log(`服务器运行在 http://${hostname}:${port}/`);